GenomicRanges
package.
For GRanges
and
GRangesList
objects:
colnames
returns the column name of aGRanges
orGRangesList
object.unsafeAppend
appends twoGAlignments
object together bypassing most sanity checks. Faster than the standardc
orappend
function.colnames(x, do.NULL = TRUE, prefix = "col")
unsafeAppend(obj1,obj2)
GRanges
or
GRangesList
classcolnames
for detailscolnames
for detailsGAlignments
objectGAlignments
objectcolnames
: A vector of column names.unsafeAppend
: AGAlignments
objectcolnames
returns the actual column names of the elementMetadata slot of theGRanges
orGRangesList
object.
The elementMetadata contains aDataFrame
object used
to store additional information provided by the user, such as exon ID in
our case.unsafeAppend
appends twoGAlignments
objects.DataFrame
GRanges
GRangesList
GAlignments
colnames
## an example of a RangedData annotation
gAnnot <- RangedData(
IRanges(
start=c(10,30,100),
end=c(21,53,123)),
space=c("chr01","chr01","chr02"),
strand=c("+","+","-"),
transcripts=c("trA1","trA2","trB"),
gene=c("gA","gA","gB"),
exon=c("e1","e2","e3"),
universe = "Hs19"
)
## an example of a GRangesList annotation
grngs <- as(gAnnot,"GRanges")
## accessing the colnames
colnames(grngs)
## creating a GRangesList
grngsList<-split(grngs,seqnames(grngs))
## accessing the colnames
colnames(grngsList)
## For unsafeAppend
library(GenomicAlignments)
unsafeAppend(GAlignments(),GAlignments())
Run the code above in your browser using DataLab